﻿using System.Collections.Generic;
using Catel.Articles.Base.Data.Attributes;
using Catel.Windows;

namespace Catel.Articles._02___WPF_controls.Examples.MultipleChoiceWindow
{
    [Example("MultipleChoiceWindow", "Example of the MultipleChoiceWindow",
        LongDescription = @"The MultipleChoiceWindow allows you to ask a multiple choice question (optionally with a free textual input).",
        SourceFileName = "/Examples/MultipleChoiceWindow/Code.txt",
        ImageUri = "/Examples/MultipleChoiceWindow/Screenshot.png",
        ClickHandlerName = "ShowExample")]
    public class Example
    {
        /// <summary>
        /// Shows the example.
        /// </summary>
        private static void ShowExample()
        {
            // Create a collection of choices
            List<Choice> choices = new List<Choice>();
            choices.Add(new Choice("Awesome", "Awesome, never seen such a great window!"));
            choices.Add(new Choice("Good", "It's pretty good actually"));
            choices.Add(new Choice("It's OK", "It's OK, but I've seen better"));
            choices.Add(new Choice("Hmmm", "Hmmm, what shall I say?"));

            // Show window
            Windows.MultipleChoiceWindow multipleChoiceWindow = new Windows.MultipleChoiceWindow(choices, true);
            multipleChoiceWindow.Title = "What do you think of this window?";
            multipleChoiceWindow.ShowDialog();
        }
    }
}
